package dms;

import java.util.ArrayList;
import java.util.List;

/**
 * @file ItemsInStock.java
 * @version 0.1
 * @author James Dibble 10009689
 */
public class ItemsInStock {
    // <editor-fold defaultstate="collapsed" desc="Attributes">
    private List<Item> itemsInStock;
    // </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="Constructors">
    public ItemsInStock() {
        itemsInStock = new ArrayList<Item>();
    }
    // </editor-fold>
    // <editor-fold defaultstate="collapsed" desc="Methods">
    public Item getItemByID(int ID){
        for(Item thisItem : itemsInStock){
            if(thisItem.getID() == ID) return thisItem;
        }
        return null;
    }
    
    public void addNewItem(Item givenItem){
        itemsInStock.add(givenItem);
    }
    // </editor-fold>
}
